﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<GabageFactory.Models.Factory>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	公司列表
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% using (Html.BeginForm("Index", "Factory", FormMethod.Get))
    {%>
    <TABLE class="tableCss" cellSpacing=1 cellPadding=0 width="85%" align=center border=0 >
        <TBODY>
            <TR>
                <TD  class="row_search"  height="26" valign="top"><img height="22" alt="SEARCH" src="../../Content/silver/images/icon_search.gif" width="26" border="0" />
		            公司名称：
                    <input type="text" name="name" value=""  size="15" maxlength="50"/>
		            <input type="submit" value="  搜 索  " />		
                </TD>
            </TR>
        </TBODY>
    </TABLE>
    <%} %>

    <p style="margin-top:20px;margin-left:20px">
        <%: Html.ActionLink("创建公司", "Create") %>
    </p>

    <table class="tableCss" cellspacing="1" cellpadding="0" width="100%" align="center" border="0" style="margin-top:20px" > 
       <tr>
    	    <td class="highRow" width="50">编号</td>
    	    <td class="highRow">公司名称</td>
    	    <td class="highRow">创建时间</td>
		    <td class="highRow" >修改时间</td>
		    <td class="highRow" width="100">操作</td>
	    </tr>
        <% foreach (var item in Model) { %>
	    <tr onmouseover="this.className='trbgmouseover'"  onmouseout="this.className='trmouseout' ">
	        <td class="row" align="center"  height="20"><%: item.Id %></td>
		    <td class="row"> <%: item.Name %></td>
		    <td class="row"> <%: item.CreateTime %></td>
            <td class="row"> <%: item.ModifyTime %></td>
		    <td class="row" align="center">
                <%: Html.ActionLink("编辑", "Edit", new { id=item.Id }) %> |
                <%: Html.ActionLink("删除", "Delete", new { id = item.Id }, new { onclick=@"return confirm('确定删除公司" + item.Name + @"吗？');"})%>
            </td>
        </tr>
        <%} %>
    </table>

    

</asp:Content>